﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using Models;

namespace BLL
{
    public class UserInfoManager
    {
        /// <summary>
        /// 获取所有值
        /// </summary>
        /// <returns></returns>
        public static List<UsersInfo> GetAdd()
        {
            return UsersInfoServices.UserSelects();
        }
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="name"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        public static bool Login(string name, string pwd)
        {
            return UsersInfoServices.UserLogin(name, pwd);
        }
        /// <summary>
        /// 注册
        /// </summary>
        /// <param name="name"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        public static bool Registered(UsersInfo usersInfo)
        {
            return UsersInfoServices.UsersAdd(usersInfo);
        }
        /// <summary>
        /// 查重
        /// </summary>
        /// <param name="usersInfo"></param>
        /// <returns></returns>
        public static bool ByNameSelect(string userName)
        {
            return UsersInfoServices.UserAddSelect(userName);
        }
    }
}
